String clazzTpl({package}) => """
import 'dart:ui';
import 'app.dart';
import 'dart:async';
import 'utils/sys_error_util.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

void main() {
  FlutterError.onError = SysErrorUtil.onError;
  ErrorWidget.builder = SysErrorUtil.builder;

  runZonedGuarded<Future<void>>(() async {
    WidgetsFlutterBinding.ensureInitialized();
    SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
      statusBarColor: Colors.transparent,
      systemNavigationBarColor: Colors.transparent,
      systemNavigationBarDividerColor: Colors.transparent,
    ));
    runApp(App(route: window.defaultRouteName));
  }, SysErrorUtil.writeErrorLog);
}
""";
